const {
  join
} = require('path')

const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
  entry: './src/main.js',
  output: {
    path: join(__dirname, 'dist'),
    filename: 'bundle.js'
  },
  module: {
    rules: [
      {
      test: /\.vue$/,
      use: [
        'vue-loader',
      ]
    },  {
      test: /\.css$/,
      use: [
        { loader: 'style-loader' },
        {
          loader: 'css-loader'
        }
      ]
    },
    {
      test: /\.(png|jpg|gif|ttf|svg)$/,
      use: [
        {
          loader: 'url-loader'
        }
      ]
    }
  ]
  },
  plugins: [
    new HtmlWebpackPlugin({
      filename: 'index.html',
      template: './template.html'
    })
  ]
}